<script setup lang="ts">
import {checkRecycleType, findRecyclebinFileApi} from "../operation/FileApi";
import {ref,onMounted} from "vue";
import FileShow from './common/RecycleFile.vue'
let data= ref<Array<checkRecycleType>>([])

const getData=async ()=>{
  await findRecyclebinFileApi().then(res=>{
         if(res.code=='00000'){
             data.value=res.data;
         }
  })
}

onMounted(()=>{
    getData();
})

const update= ()=>{
  getData()
}

</script>



<template>

  <div class="file_infos" >
    <div v-for="(item,index) in data" :key="index"  style="text-align: center">
      <FileShow :fileInfo="item" @updateData="update" />

    </div>

  </div>
</template>

<style scoped>
     .file_infos{
        display: flex;
       flex-wrap: wrap;
     }
</style>